package com.swx.guard.config;

import com.swx.guard.bean.ServerConfig;
import com.swx.guard.bean.Service;
import com.xj.starter.factory.YamlPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * @author Ricky
 * @date 2020/12/3
 */
@Data
@Configuration
@PropertySource(value = {"classpath:service-config.yml"}, factory = YamlPropertySourceFactory.class)
@ConfigurationProperties(prefix = "service-config")
public class ServiceConfig {

    private ServerConfig serverConfig;

    private List<Service> serviceList;

}
